package io.renren.modules.edu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.edu.dao.EduKecDao;
import io.renren.modules.edu.dto.EduKecDTO;
import io.renren.modules.edu.entity.EduKecEntity;
import io.renren.modules.edu.service.EduKecService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 课程表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2023-05-08
 */
@Service
public class EduKecServiceImpl extends CrudServiceImpl<EduKecDao, EduKecEntity, EduKecDTO> implements EduKecService {

    @Override
    public QueryWrapper<EduKecEntity> getWrapper(Map<String, Object> params){
        String cname = (String)params.get("cname");

        QueryWrapper<EduKecEntity> wrapper = new QueryWrapper<>();
        wrapper.like(StringUtils.isNotBlank(cname), "cname", cname);

        return wrapper;
    }


}